package ex;

public class ex2 {
        public static void main(String[] args) {
            int i1=17,i2=64,i3=-9,i4=238,i5=167,i6=135,i;

            System.out.println(i1 + "的二进制是:" + Integer.toBinaryString(i1));
            System.out.println(i2 + "的二进制是:" + Integer.toBinaryString(i2));
            System.out.println(i3 + "的二进制是:" + Integer.toBinaryString(i3));
            System.out.println(i4 + "的十六进制是:" + Integer.toHexString(i4));
            System.out.println(i5 + "的十六进制是:" + Integer.toHexString(i5));
            System.out.println(i6 + "的十六进制是:" + Integer.toHexString(i6));
            System.out.println(i4+ "的二进制是:" + Integer.toBinaryString(i4));
            System.out.println(i5 + "的二进制是:" + Integer.toBinaryString(i5));
            System.out.println(i6 + "的二进制是:" + Integer.toBinaryString(i6));
        }
}
